package com.lin.blog.entity;

import java.io.Serializable;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

public abstract class BaseBean implements Serializable {
	private static final long serialVersionUID = 5816847661336438815L;
	private long id;

	public long getId() {
		return id;
	}

	public BaseBean setId(long id) {
		this.id = id;
		return this;
	}

	public Key getKey() {
		return KeyFactory.createKey(getShortName(), id);
	}

	public abstract String getShortName();
}
